package com.wkk.mapper;

import com.wkk.entity.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface CoachMapper {

    //以下操作均是对教练信息表t_coach以及用户信息表t_user的持久化操作

    List<Coach> selectListByMold(String Mold);

    int insertCoach(Coach coach);

    int deleteCoachByCid(Integer cid);

    List<Coach> selectListOrderByRank();

    Coach selectOneByCid(Integer cid);

    Coach selectOneByNameAndMobile(Coach coach);

    Coach selectOneByMobile(String mobile);

    Coach selectOneByName(String name);

    List<User> selectStudentsByCid(Integer cid);

    int updateCoach(Coach coach);

    int updateCoachMold(Coach coach);

    int updateUserConnectCoach(User user);

    int updateUserConnectCoachSuccess(User user);

    int updateCoachRank(Coach coach);

    int updateStopCoach(User user);

    //以下操作均是对教练业绩表t_coach_performance的持久化操作
    int insertPerformance(CoachPerformance coachPerformance);

    int deletePerformanceByCid(Integer cid);

    int updatePCourseCount(CoachPerformance coachPerformance);

    int updatePStudentCount(CoachPerformance coachPerformance);

    int updatePCommentCount(CoachPerformance coachPerformance);

    CoachPerformance selectOneP(CoachPerformance coachPerformance);

    List<CoachPerformance> selectListPerformanceByCid(Integer cid);

    List<CoachPerformance> selectListPerformanceByTime(CoachPerformance coachPerformance);

    //以下是对教练与学员表进行操作
    int insertIntoCCM(CoachConnectMember coachConnectMember);

    CoachConnectMember selectCCMByCid(CoachConnectMember coachConnectMember);

    //以下是对教练荣誉表进行操作
    int insertHonor(Honor honor);

    int deleteHonorById(Integer id);

    int updateHonor(Honor honor);

    List<Honor> selectListHonorByCid(Integer cid);

    Honor selectOneHonorById(Integer id);
}
